package com.fingard.dsp.bank.reqrespobj.currtransperiod;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RetAtsBase;
import com.fingard.dsp.bank.reqrespobj.currtransperiod.detail.RetAtsCurrTransPerDetail;
import com.fingard.xml.XmlTextWriter;

/**
 * Created by F on 2018/11/19.
 */
public class RetAtsCurrTransPer extends RetAtsBase {

    public RetAtsCurrTransPerDetail retDetail;
    public RetAtsCurrTransPer(ReqRespHeader p_header){
        retHeader = p_header;
        retXmlWriter = new XmlTextWriter();//用于输出返回ATS的XML报文
    }

    public void writeRetDetail(RetAtsCurrTransPerDetail p_detail) throws  Exception{
        writeStart();//写返回ATS的统一头部信息
        retDetail = p_detail;

        p_detail.writeToXml(retXmlWriter,retHeader.bankCode,retHeader.transType);

        retXmlWriter.writeEndElement();
        writeEnd();//写结束
    }
}
